Inside Macintosh: Macintosh Toolbox Essentials

Previous | Chapter Top | Chapter Contents | Next

Window Definition Function Enumerators

The Window Manager passes one of the following values in the message parameter of a window definition function:

enum {
    wDraw           = 0,    /* draw window frame */
    wHit            = 1,    /* report where mouse-down event occurred */
    wCalcRgns       = 2,    /* calculate strucRgn and contRgn */
    wNew            = 3,    /* perform additional initialization */
    wDispose        = 4,    /* perform additional disposal */
    wGrow           = 5,    /* draw grow image during resizing */
    wDrawGIcon      = 6     /* draw size box and scroll bar outline */
};

Enumerator descriptions

wDraw
Draws the window's frame.
wHit
Reports the location of a mouse-down event.
wCalcRgns
Calculates the structure region and the content region.
wNew
Performs additional initialization.
wDispose
Performs additional disposal.
wGrow
Draws the grow image during resizing operation.
wDrawGIcon
Draws the outlines for the size box and the scroll bar.

If the window definition function receives a wHit message, it should return one of these values:

enum {
    wNoHit       = 0,   /* none of the following */
    wInContent   = 1,   /* in content region (except grow, if active) */
    wInDrag      = 2,   /* in drag region */
    wInGrow      = 3,   /* in grow region (active window only) */
    wInGoAway    = 4,   /* in go-away region (active window only) */
    wInZoomIn    = 5,   /* in zoom box for zooming in (active window
                        /* only) */
    wInZoomOut  = 6,    /* in zoom box for zooming out (active window
                        /* only) */
};

Enumerator descriptions

wNoHit
Mouse-down did not occur in the content region or the drag region of any window or the grow, go-away or zoom box for zooming in or out of an active window.
wInContent
Mouse-down occurred in the content region with the exception of the grow region if the window is active.
wInDrag
Mouse-down occurred in the drag region.
wInGrow
Mouse-down occurred in the grow region of an active window.
wInGoAway
Mouse-down occurred in the go-away region of an active window
wInZoomIn
Mouse-down occurred in the in-zoom box for zooming in an active window.
wInZoomOut
Mouse-down occurred in the out-zoom box for zooming out of an active window.

For information about writing a window definition function, see "Application-Defined Function" .


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next